<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<t:wrapper title="${title}">
	<jsp:body>
		<c:choose>
			<c:when test="${chapters.size() == 0}">
				<p>
					<spring:message code="course.manage.no_chapters_found"/> 
					<a href="<c:url value="/course/chapter/new"/>">
						<spring:message code="course.manage.create_chapter"/>
					</a>?
			</c:when>
			<c:otherwise>
				<ul id="overview">
					<c:forEach items="${chapters}" var="chapter">
						<li><a href="<c:url value="/course/chapter/edit/${chapter.id}"/>">${chapter.title}</a></li>
					</c:forEach>
				</ul>	
			</c:otherwise>
		</c:choose>	
	</jsp:body>
</t:wrapper>